//
// Created by Administrator on 24-8-10.
//

#include "Beep.h"

Beep::Beep(GPIO_TypeDef *Port, uint16_t pin) {
    this->BEEP_PROT=Port;
    this->BEEP_PIN=pin;
}

void Beep::BeepOn() {
    HAL_GPIO_WritePin(this->BEEP_PROT,this->BEEP_PIN,GPIO_PIN_SET);
}

void Beep::BeepOff() {
    HAL_GPIO_WritePin(this->BEEP_PROT,this->BEEP_PIN,GPIO_PIN_RESET);
}

void Beep::BeepWarning(uint32_t delay) {
    HAL_Delay(delay);
    BeepOn();
    HAL_Delay(delay);
    BeepOff();
}


